package cn.fsd.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
public class CustomerException extends RuntimeException{
    private Integer code;
    private String msg;

    public CustomerException(CustomerExceptionCodeMsg customerExceptionCodeMsg){
        this.code = customerExceptionCodeMsg.getCode();
        this.msg = customerExceptionCodeMsg.getMsg();
    }

    public CustomerException(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

}
